package com.qfedu.firstpage.service.impl;

import com.qfedu.firstpage.dao.RecordMapper;
import com.qfedu.firstpage.entity.Record;
import com.qfedu.firstpage.entity.RecordExample;
import com.qfedu.firstpage.service.RecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RecordServiceImpl implements RecordService {

    @Autowired
    private RecordMapper recordMapper;

    @Override
    public List<Record> selectByExample(RecordExample example) {

        return recordMapper.selectByExample(example);
    }

    @Override
    public Record selectByPrimaryKey(Integer id) {

        return recordMapper.selectByPrimaryKey(id);
    }

    @Override
    public Record getVipUserById(Integer id) {

        return recordMapper.getVipUserById(id);
    }

    @Override
    public Record getExpenditureById(Integer id) {

        return recordMapper.getExpenditureById(id);
    }

    @Override
    public int insertVIPUser(Record record) {

        return recordMapper.insert(record);
    }
}
